package com.karal.javase.cher03;

/**
 * @TODO
 * @Author xu
 * 2025/3/6
 */
public class Manager extends Employee {
    private String level;

    // 构造方法
    public Manager(String name, String address, String ID, double wage, int yearsOfService, String level) {
        super(name, address, ID, wage, yearsOfService);
        this.level = level;
    }

    @Override
    public void increaseSalary() {
        super.increaseSalary(); // 首先调用父类的方法
        double wage = this.getWage() * 1.20; // 经理涨20%
        setWage(wage);
    }

    @Override
    public String toString() {
        return "经理信息: " + super.toString() + ", 级别: " + level;
    }

    // Getter and Setter for wage
    public double getWage() {
        return super.getWage(); // 这里可以需要暴露工资的getter
    }

    public void setWage(double wage) {
        super.setWage(wage); // 设置新的工资
    }

}
